from django.conf.urls import patterns,url
from models import LineaInvestigacion
from forms import LineaInvestigacionForm
from django.views import generic

import autocomplete_light


urlpatterns = patterns('lineas_de_investigacion.views',
                       
    (r'^$', 'listar'),
    url(r'^(?P<object_id>\d+)/$', 'ver', name='lineas_ver'),
    (r'^crear/$', 'crear'),
    (r'^(?P<object_id>\d+)/editar/$', 'editar'),
    (r'^(?P<object_id>\d+)/eliminar/$', 'eliminar'),
    url(r'add/$', 
        autocomplete_light.CreateView.as_view(model=LineaInvestigacion,form_class=LineaInvestigacionForm), 
        name='linea_create'),
    url(r'(?P<pk>\d+)/update/$', generic.UpdateView.as_view(
        model=LineaInvestigacion,form_class=LineaInvestigacionForm ), name='linea_update'),
)